<template>
  <div class="stepper-input">
    <div class="title">{{ title }}</div>
    <Stepper v-bind="$props" @input="changedValue => $emit('input', changedValue)" />
  </div>
</template>

<script>
import Stepper from '@/components/common/Stepper.vue';
export default {
  components: {
    Stepper,
  },
  props: {
    canInput: {
      type: Boolean,
      default: true,
    },
    value: {
      type: Number,
      default: 0,
    },
    min: {
      type: Number,
      default: 0,
    },
    max: {
      type: Number,
      default: Infinity,
    },
    title: {
      type: String,
      default: '',
    },
  },
};
</script>
<style lang="less" scoped>
.stepper-input {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  .title {
    font-family: PingFangSC-Regular;
    font-size: 14px;
    color: var(--text-1);
    line-height: 18px;
    font-weight: 400;
  }
}
</style>
